import React, { Component } from 'react'
import Child from './Child'

export default class Parent extends Component {

  state = {
    count: 0
  }

  // renderFun = (title) => {
  //   return (
  //     <div>{title} {this.state.count}</div>
  //   )
  // }

  render() {
    return (
      <>
        <div>Parent</div>
        <Child>
          {
            (title) => {
              return (
                <div>{title} {this.state.count}</div>
              )
            }
          }
        </Child>
      </>
    )
  }
}
